/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Hola;



/**
 * @author luisorozco
 */
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class MoverImagen extends MIDlet implements CommandListener {
private TextBox box;
public static TextBox mapa,script;
private MoverImagen midlet;
private Imagen panCanvas;
private Command salir1;
private Portada  panCanvas2;
private Portada2 panCanvas3;

private Display pantalla;
public MoverImagen(){
   
    box = new TextBox("mapas", "", 2, 0);
    salir1 = new Command("Regresar",Command.EXIT,1);
    mapa = new TextBox("Seleccionar mapa", "", 154, 0);
    mapa.addCommand(salir1);
    mapa.setCommandListener(this);
    
    
    
    
    script = new TextBox("Crear Sript", "", 154, 0);
    script.addCommand(salir1);
    script.setCommandListener(this);
    
    pantalla = Display.getDisplay(this);
    panCanvas2= new Portada(this);
    panCanvas3= new Portada2(this);
    
    panCanvas = new Imagen(this); 
}
public void startApp() {
    pantalla.setCurrent(panCanvas2); 
   
}

public static String darCodigoMapa() {
                return mapa.getString();
        }

public static String darCodigoScript() {
                return script.getString();
        }
public void pauseApp() {
}
public void destroyApp(boolean uncond){
}

public void salir(){

        destroyApp(false);
        notifyDestroyed(); 
    }
public void juego(){
    pantalla.setCurrent(panCanvas);
        
    }

public void principio(){
    pantalla.setCurrent(panCanvas2);
        
    }
public void instrucciones(){
    pantalla.setCurrent(panCanvas3);
        
    } 
public void mapa(){
    pantalla.setCurrent(mapa);
        
    }
public void script(){
    pantalla.setCurrent(script);
        
    }

    public void commandAction(Command c, Displayable d) {
        if (c == salir1){
           principio();
        }
    }
}

